<template>
	<view>
		<view class="bj1">
			<span class="sj">限时兑换</span>
		</view>
		<view class="zong">
			<view class="sp" v-for="item in remen" @click="gotospxq(item.commodityId)">
				<image :src="item.commodityimgs[0].pash" style="width: 110px;height: 110px;border-radius: 10px;"></image>
				<view style="display: inline-block;margin-left: 5px;position: relative;top: -94px;font-size: 14px;color: #333333;"><span>{{item.commodityName}}</span></view>
				<br>
				<view style="display: inline-block;margin-left: 115px;position: relative;top: -50px;font-size: 17px;color: #FF5E81;"><span><b>{{item.price}}币</b></span></view>
				<view style="display: inline-block;margin-left: -47px;position: relative;top: -30px;font-size: 14px;color: #C0C0C0;text-decoration: line-through;"><span>{{item.newprice}}</span></view>
				<view style="width: 65px;height: 30px;background-color: #FF5E81;border-radius: 15px;margin-left: 250px;position: relative;top:-70px;color: #FFFFFF;font-size: 13px;"><span style="position: relative;top: 6px;left: 13px;">马上兑</span></view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				remen:[],
			}
		},
		onLoad() {
			this.initremen()
		},
		methods: {
			gotospxq(commodityid){
				uni.navigateTo({
					url:'./spxq?commodityid='+commodityid
				})
			},
			initremen(){
				uni.request({
					url:'http://localhost:9525/xkuser/ljp/initxsdh',
					method: 'GET',
				   data: {
					   // keyword: this.keyword,
				   },
				   dataType:'json',
				   success: (res) => {
						var result = res.data.message;
						this.remen=res.data.data.xsdh
						
							
					},
				})	
			}
		}
	}
</script>

<style>
	.sp{
		width: 340px;
		height: 110px;
		background-color: #FFFFFF;
		box-shadow: 2px 2px 10px #909090;
		border-radius: 10px;
		margin-left: 17px;
		margin-top: 10px;
	}
	.zong{
		width: 100%;
		height: 600px;
		/* background-color: #007AFF; */
	}
	.sj{
		font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
			font-weight: 700;
			font-size: 20px;
			color: #FFFFFF;
			margin-left: 15px;
			position: absolute;
			top: 20px;
		}
	.bj1{
			width:100%;
			height:210rpx;
			background-image: url(../../static/indeimg/xia.png);
			
		}
</style>

